#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void my_fun(int arr1[10],int arr2[10], int sz)
{
	int i = 0;
	for (i = 0; i < sz - 1; i++)
	{
		int tmp = arr1[i];
		arr1[i] = arr2[i];
		arr2[i] = tmp;
	}
	for (i = 0; i < sz - 1; i++)
	{
		printf("%d ", arr1[i]);
	}
	printf("\n");
	for (i = 0; i < sz - 1; i++)
	{
		printf("%d ", arr2[i]);
	}
	printf("\n");
}
int main()
{
	int i = 0;
	int arr1[10] = { 1,2,3,4,5 };
	int arr2[10] = { 5,4,543,4 };
	int sz = sizeof(arr1) / sizeof(arr1[0]);
	for (i = 0; i < sz - 1; i++)
	{
		printf("%d ", arr1[i]);
	}
	printf("\n");
	for (i = 0; i < sz - 1; i++)
	{
		printf("%d ", arr2[i]);
	}
	printf("\n");
	my_fun(arr1, arr2, sz);
	return 0;
}